#include <stdio.h>
 int main ()
 {
 	int n,sum,i;
 	printf("请输入一个正整数n:");
 	scanf("%d",&n);
	 for(i=0;i<=n;i++)
	 {
		 sum+=i;
	 }
 	printf("累加和为%d.\n",sum);
 	return 0;
  } 
